<!--
 * @Author: your name
 * @Date: 2021-08-18 20:08:06
 * @LastEditTime: 2021-08-18 20:12:43
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \day08\xin.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>扑通扑通</title>
    <style>
         .container
      
      {
         margin: 0 auto;
    
         width: 300px;
    
         height:300px;
    
         position: relative;
    
         display:flex;
    
         justify-content:center;
    
         align-items:center;
    
         background-image: radial-gradient(#FFC0CB, #FF8888);
    
         border: 4px solid rgba(255, 0, 0, 0.9);
    
         border-radius: 10%;
    
       }
    
       .heart
    
       {
    
          width: 100px;
    
          height: 100px;
    
          background-color: #FF6347;
    
          position: relative;
    
          animation:beat .6s infinite ease-in;
    
       }
    
       .heart:before, .heart:after
    
       {
    
          content:"";
    
          position: absolute;
    
          width: 100px;
    
          height: 100px;
    
          background-color: #FF6347;
    
          border-radius: 50%;
    
       }
    
       .heart:before
    
       {
    
          left: 50px;
    
       }
    
       .heart:after
    
       {
    
          top: -50px;
    
       }
       .heart:nth-child(1)

{

    animation: beat 5s infinite -3s linear;

}

.heart:nth-child(2)

{

    animation: beat 5s infinite -2s linear;

}

.heart:nth-child(3)

{

    animation: beat 5s infinite -1s linear;

}

.heart:nth-child(4)

{

    animation: beat 5s infinite linear;

}

@keyframes beat

{

   0%    { transform:scale(0.6) rotate(-45deg);}

   20%   { transform:scale(1) rotate(-45deg); }

   40%  { transform:scale(1.4) rotate(-45deg) ; }

   60%    { transform:scale(1.8) rotate(-45deg);}

   80%   { transform:scale(2.4) rotate(-45deg); }

   81%   { transform:scale(0.2) rotate(-45deg); }

   100%  { transform:scale(0.6) rotate(-45deg) ; }

}
    </style>
</head>
<body>
    <div class="container">
        <div class="heart"></div>
    </div>
</body>
</html>